package com.atguigu.gmall.payment.controller;

import com.atguigu.gmall.payment.service.AliPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wk
 * @create 2021-09-14 17:31
 */
@RestController
@RequestMapping("/api/payment/alipay")
public class AliPayController {
    @Autowired
    private AliPayService aliPayService;
    // 点击支付宝支付 跳转
    @GetMapping("/submit/{orderId}")
    public String AliPay(@PathVariable Long orderId) {
        return aliPayService.submit(orderId);
    }
}
